<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>XenC: include/wfile.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">XenC
   &#160;<span id="projectnumber">1.0</span>
   </div>
   <div id="projectbrief">Open-source tool for data selection in NLP</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">wfile.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="wfile_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment">/*  This file is part of the cross-entropy tool for data selection (XenC)</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> *  aimed at speech recognition and statistical machine translation.</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> *  Copyright 2013-2016, Anthony Rousseau, LIUM, University of Le Mans, France</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> *  Development of the XenC tool has been partially funded by the</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"> *  European Commission under the MateCat project.</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment"> *  The XenC tool is free software; you can redistribute it and/or modify it</span></div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment"> *  under the terms of the GNU Lesser General Public License version 3 as</span></div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment"> *  published by the Free Software Foundation</span></div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment"> *  This library is distributed in the hope that it will be useful, but WITHOUT</span></div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="comment"> *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or</span></div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="comment"> *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License</span></div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="comment"> *  for more details.</span></div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="comment"> *  You should have received a copy of the GNU Lesser General Public License</span></div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="comment"> *  along with this library; if not, write to the Free Software Foundation,</span></div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="comment"> *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</span></div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="preprocessor">#ifndef WFILE_H_</span></div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="preprocessor">#define WFILE_H_</span></div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="common_8h.html">utils/common.h</a>&quot;</span></div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="xenio_8h.html">utils/xenio.h</a>&quot;</span></div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="xenfile_8h.html">xenfile.h</a>&quot;</span></div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;</div><div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="class_wfile.html">   45</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_wfile.html">Wfile</a> {</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;    <a class="code" href="class_wfile.html#a49f0711a359c4a728974f1d5e017f119">Wfile</a>();</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;    </div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_wfile.html#a5371e7261937a698f411796cd24d135a">initialize</a>(boost::shared_ptr&lt;XenFile&gt; ptrFile);</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;    </div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;    <a class="code" href="class_wfile.html#ab2416b03f6f9c880283f99e61acccb0d">~Wfile</a>();</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;    <span class="keywordtype">double</span> <a class="code" href="class_wfile.html#a16f2d97788cc1465e902073dca6d0bf8">getWeight</a>(<span class="keywordtype">int</span> n);</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;    </div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;    <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="class_wfile.html#a481ea084ad9b6b89fb5777ec7221494e">getSize</a>() <span class="keyword">const</span>;</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;    </div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;<span class="keyword">private</span>:</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;    boost::shared_ptr&lt;XenFile&gt; ptrFile;                     </div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;    boost::shared_ptr&lt;std::vector&lt;double&gt; &gt; ptrWeights;     </div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;    <span class="keywordtype">void</span> loadWeights();</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;    </div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;    <span class="keywordtype">void</span> calibrate();</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;};</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;<span class="preprocessor">#endif</span></div><div class="ttc" id="xenio_8h_html"><div class="ttname"><a href="xenio_8h.html">xenio.h</a></div><div class="ttdoc">Class handling all input/output operations of XenC. </div></div>
<div class="ttc" id="class_wfile_html_ab2416b03f6f9c880283f99e61acccb0d"><div class="ttname"><a href="class_wfile.html#ab2416b03f6f9c880283f99e61acccb0d">Wfile::~Wfile</a></div><div class="ttdeci">~Wfile()</div><div class="ttdoc">Default destructor. </div><div class="ttdef"><b>Definition:</b> wfile.cpp:56</div></div>
<div class="ttc" id="class_wfile_html_a481ea084ad9b6b89fb5777ec7221494e"><div class="ttname"><a href="class_wfile.html#a481ea084ad9b6b89fb5777ec7221494e">Wfile::getSize</a></div><div class="ttdeci">unsigned int getSize() const </div><div class="ttdoc">Accessor to the size of the weights file. </div><div class="ttdef"><b>Definition:</b> wfile.cpp:64</div></div>
<div class="ttc" id="class_wfile_html_a5371e7261937a698f411796cd24d135a"><div class="ttname"><a href="class_wfile.html#a5371e7261937a698f411796cd24d135a">Wfile::initialize</a></div><div class="ttdeci">void initialize(boost::shared_ptr&lt; XenFile &gt; ptrFile)</div><div class="ttdoc">Initialization function from an already instanciated XenFile. </div><div class="ttdef"><b>Definition:</b> wfile.cpp:37</div></div>
<div class="ttc" id="xenfile_8h_html"><div class="ttname"><a href="xenfile_8h.html">xenfile.h</a></div><div class="ttdoc">Class providing some basic functions around files. </div></div>
<div class="ttc" id="class_wfile_html"><div class="ttname"><a href="class_wfile.html">Wfile</a></div><div class="ttdoc">Class handling a file with values intended at weighting XenC scores. </div><div class="ttdef"><b>Definition:</b> wfile.h:45</div></div>
<div class="ttc" id="common_8h_html"><div class="ttname"><a href="common_8h.html">common.h</a></div><div class="ttdoc">File containing all common classes/structures/functions of many classes of XenC. </div></div>
<div class="ttc" id="class_wfile_html_a49f0711a359c4a728974f1d5e017f119"><div class="ttname"><a href="class_wfile.html#a49f0711a359c4a728974f1d5e017f119">Wfile::Wfile</a></div><div class="ttdeci">Wfile()</div><div class="ttdoc">Default constructor. </div><div class="ttdef"><b>Definition:</b> wfile.cpp:33</div></div>
<div class="ttc" id="class_wfile_html_a16f2d97788cc1465e902073dca6d0bf8"><div class="ttname"><a href="class_wfile.html#a16f2d97788cc1465e902073dca6d0bf8">Wfile::getWeight</a></div><div class="ttdeci">double getWeight(int n)</div><div class="ttdoc">Accessor to the nth weight of the file. </div><div class="ttdef"><b>Definition:</b> wfile.cpp:60</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Mar 18 2016 17:22:37 for XenC by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>
